import request from '@/utils/request'

// 创建主体标签
export function createTag(data) {
  return request({
    url: '/market/tag/create',
    method: 'post',
    data: data
  })
}

// 更新主体标签
export function updateTag(data) {
  return request({
    url: '/market/tag/update',
    method: 'put',
    data: data
  })
}

// 删除主体标签
export function deleteTag(id) {
  return request({
    url: '/market/tag/delete?id=' + id,
    method: 'delete'
  })
}

// 获得主体标签
export function getTag(id) {
  return request({
    url: '/market/tag/get?id=' + id,
    method: 'get'
  })
}

// 获得主体标签分页
export function getTagPage(params) {
  return request({
    url: '/market/tag/page',
    method: 'get',
    params
  })
}
// 导出主体标签 Excel
export function exportTagExcel(params) {
  return request({
    url: '/market/tag/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}